home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
DEV
/
I-Z
/
RA.cpt
/
Loop.ra
< prev
next >
Wrap
Text File
|
1986-10-15
|
740b
|
47 lines
|
| RA™
|
| Loops
|
| © 1986 COM~LINK & S.Koren
|
#M;
"RA™ has one type of looping construct.!"
"Any code imbedded between ()!"
"will loop forever.!!"
"If a ~ is inserted within the ()!"
"the top number on the stack is!"
"tested, and if true the loop!"
"terminates.!!"
#A;
"A single loop:!"
10 A: ( A. ! A. 1 - A: A. 0 > ~)
#A;
"Now a nested loop:"
5 A: ( "!A!" 5 B: ("B" B . 1 - B: B. 0 > ~) A. 1 - A: A. 0 > ~) "!"
#A;
"THE END."
$
&A
"!Hit any key: " ?§ µ @`
|
| RA title routine
|
&M @ #L; 8 A: ( #N; A. 1 - A: A. 0 > ~ ) #L; #O; #P;`
&O
40 100 Ω
"RA™"
60 45 Ω
"© 1986 COM~LINK & S.Koren"
80 60 Ω
"All rights reserved." `
&L
35 A: ("•" A. 1 - A: A. 0 > ~ ) "!"`
&N
"•" 33 A: (" " A. 1 - A: A. 0 > ~ ) "•" "!"`
&P ?§ @ `
$